Shader "Custom RP/Unlit" {
	
	Properties
	{
		_BaseMap("Texture", 2D) = "white" {} // 纹理
		_BaseColor("Color", Color) = (1.0, 1.0, 1.0, 1.0) // 获取颜色
		_Cutoff ("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 // alpha裁剪
		[Toggle(_CLIPPING)] _Clipping ("Alpha Clipping", Float) = 0 // 开启alpha裁剪
		[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Src Blend", Float) = 1 // 源颜色的混合因子
		[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Dst Blend", Float) = 0 // 目标颜色的混合因子
		[Enum(Off, 0, On, 1)] _ZWrite ("Z Write", Float) = 1 // 开启深度写入
	}
	
	SubShader {
		
		Pass
		{
			Blend [_SrcBlend] [_DstBlend] // 启用透明度混合
			ZWrite [_ZWrite] // 设置深度写入
			
			HLSLPROGRAM
			#pragma target 3.5
			#pragma shader_feature _CLIPPING // 启用alpha裁剪
			#pragma multi_compile_instancing // GPU实例化
			#pragma vertex UnlitPassVertex // 顶点着色器
			#pragma fragment UnlitPassFragment // 片元着色器
			#include "UnlitPass.hlsl"
			ENDHLSL
		}
	}
	CustomEditor "CustomShaderGUI"
}